package com.cuit.bysj.service;

import java.util.List;

import com.cuit.bysj.dao.StuDao;
import com.cuit.bysj.entities.Student;

public class StuService {
	private StuDao stuDao;

	public StuDao getStuDao() {
		return stuDao;
	}

	public void setstuDao(StuDao stuDao) {
		this.stuDao = stuDao;
	}

	// 查询返回学生列表
	@SuppressWarnings("unchecked")
	public List<Student> stulist() {
		List<Student> list = stuDao.querylist("from Student");

		return list;
	}

	public Student findStu(Integer id) {
		return stuDao.getByid(id);
	}

	public void updateStu(Student stu) {
		stuDao.updateStu(stu);
	}
}
